package com.antoco.operation.bigscreen.mapper;

import com.antoco.operation.bigscreen.model.dto.SensorWarnShowDTO;
import com.antoco.operation.bigscreen.model.entity.SensorWarn;
import org.mapstruct.*;


@Mapper(componentModel = "spring", uses = ReferenceMapper.class)
public interface SensorWarnShowMapper extends GenericMapper<SensorWarn, SensorWarnShowDTO> {
    @Mappings({
        @Mapping(source = "sensorWarn.sensor.name",target = "name"),
        @Mapping(source = "sensorWarn.sensor.gisName",target = "gisName"),
        @Mapping(source = "sensorWarn.sensor.sensorImgs",target = "sensorImgs"),
        @Mapping(source = "sensorWarn.sensor.id",target = "sensorId")
    })
    public SensorWarnShowDTO asDTO(SensorWarn sensorWarn);
}